package com.rw.coco.data.data;

import com.rw.coco.api.data.PersistenceMapper;
import com.rw.coco.api.data.TransactionSwitch;
import com.rw.coco.api.data.persistence.*;
import com.rw.coco.data.data.mapper.*;
import com.rw.coco.data.data.transaction.FileTransactionSwitch;

/**
 * 持久化数据mapper
 */
public class FilePersistenceMapper implements PersistenceMapper {
    private final FileAccountMapper fileAccountMapper;
    private final FileCharacterMapper fileCharacterMapper;
    private final FileCharacterPropertyMapper fileCharacterPropertyMapper;
    private final FileBotMapper fileBotMapper;
    private final FileDeckMapper fileDeckMapper;
    private final CardMapper fileCardMapper;
    private final FileGroupMapper fileGroupMapper;
    private final FileObMapper fileObMapper;

    public FilePersistenceMapper(String workPath) {
        fileAccountMapper = new FileAccountMapper(workPath);
        fileCharacterMapper = new FileCharacterMapper(workPath);
        fileCharacterPropertyMapper = new FileCharacterPropertyMapper(workPath);
        fileBotMapper = new FileBotMapper(workPath);
        fileDeckMapper = new FileDeckMapper(workPath);
        fileCardMapper = new FileCardMapper(workPath);
        fileGroupMapper = new FileGroupMapper(workPath);
        fileObMapper = new FileObMapper(workPath);
    }

    @Override
    public AccountMapper getAccountMapper() {
        return fileAccountMapper;
    }

    @Override
    public CharacterMapper getCharacterMapper() {
        return fileCharacterMapper;
    }

    @Override
    public CharacterPropertyMapper getCharacterPropertyMapper() {
        return fileCharacterPropertyMapper;
    }

    @Override
    public BotMapper getBotMapper() {
        return fileBotMapper;
    }

    @Override
    public DeckMapper getDeckMapper() {
        return fileDeckMapper;
    }

    @Override
    public CardMapper getCardMapper() {
        return fileCardMapper;
    }

    @Override
    public GroupMapper getGroupMapper() {
        return fileGroupMapper;
    }

    @Override
    public ObMapper getObMapper() {
        return fileObMapper;
    }

    @Override
    public TransactionSwitch getTransactionSwitch() {
        return new FileTransactionSwitch();
    }
}
